[IA64] Warnings removal and small cleanups.
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Mon, 6 Mar 2006 16:06:55 +0000 (09:06 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Mon, 6 Mar 2006 16:06:55 +0000 (09:06 -0700)
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
xen/arch/ia64/linux-xen/smpboot.c
xen/arch/ia64/xen/dom_fw.c
xen/arch/ia64/xen/domain.c
xen/arch/ia64/xen/vcpu.c
xen/arch/ia64/xen/xentime.c
xen/include/asm-ia64/dom_fw.h
xen/include/asm-ia64/flushtlb.h
xen/include/asm-ia64/linux-xen/asm/system.h
xen/include/asm-ia64/mm.h

index a7e5e780c5684bda3870ce659975192b18ae8a6b..d75cd58f960b8aace0f4e5ef65ba05cc2c2e010b 100644 (file)
@@ -482,16 +482,14 @@ do_boot_cpu (int sapicid, int cpu)
 do_rest:
        task_for_booting_cpu = c_idle.idle;
 #else
-       struct domain *idle;
        struct vcpu *v;
-       void *stack;
 
        v = idle_vcpu[cpu] = alloc_vcpu(idle_vcpu[0]->domain, cpu, cpu);
        BUG_ON(v == NULL);
 
-       printf ("do_boot_cpu: cpu=%d, domain=%p, vcpu=%p\n", cpu, idle, v);
+       //printf ("do_boot_cpu: cpu=%d, domain=%p, vcpu=%p\n", cpu, idle, v);
 
-       task_for_booting_cpu = v;
+       task_for_booting_cpu = (task_t *)v;
 
        /* Set cpu number.  */
        get_thread_info(v)->cpu = cpu;
@@ -522,6 +520,7 @@ do_rest:
        return 0;
 }
 
+#ifndef XEN
 static int __init
 decay (char *str)
 {
@@ -531,6 +530,7 @@ decay (char *str)
 }
 
 __setup("decay=", decay);
+#endif
 
 /*
  * Initialize the logical CPU number to SAPICID mapping
index 69a694d5776748b43d038f02e16b099ad8892a6a..37df8105b7c3212e7cca43a00d3d8e388b521c5a 100644 (file)
@@ -210,8 +210,8 @@ sal_emulator (long index, unsigned long in1, unsigned long in2,
              unsigned long in3, unsigned long in4, unsigned long in5,
              unsigned long in6, unsigned long in7)
 {
-       long r9  = 0;
-       long r10 = 0;
+       unsigned long r9  = 0;
+       unsigned long r10 = 0;
        long r11 = 0;
        long status;
 
@@ -285,12 +285,11 @@ sal_emulator (long index, unsigned long in1, unsigned long in2,
 }
 
 struct ia64_pal_retval
-xen_pal_emulator(unsigned long index, unsigned long in1,
-       unsigned long in2, unsigned long in3)
+xen_pal_emulator(unsigned long index, u64 in1, u64 in2, u64 in3)
 {
-       long r9  = 0;
-       long r10 = 0;
-       long r11 = 0;
+       unsigned long r9  = 0;
+       unsigned long r10 = 0;
+       unsigned long r11 = 0;
        long status = -1;
 
        if (running_on_sim) return pal_emulator_static(index);
@@ -364,7 +363,7 @@ xen_pal_emulator(unsigned long index, unsigned long in1,
                                &r10);
                break;
            case PAL_REGISTER_INFO:
-               status = ia64_pal_register_info(in1,&r9,&r10);
+               status = ia64_pal_register_info(in1, &r9, &r10);
                break;
            case PAL_CACHE_FLUSH:
                /* FIXME */
@@ -608,13 +607,13 @@ dom_fw_fake_acpi(struct fake_acpi_tables *tables)
        /* Trivial namespace, avoids ACPI CA complaints */
        tables->aml[0] = 0x10; /* Scope */
        tables->aml[1] = 0x12; /* length/offset to next object */
-       strncpy(&tables->aml[2], "_SB_", 4);
+       strncpy((char *)&tables->aml[2], "_SB_", 4);
 
        /* The processor object isn't absolutely necessary, revist for SMP */
        tables->aml[6] = 0x5b; /* processor object */
        tables->aml[7] = 0x83;
        tables->aml[8] = 0x0b; /* next */
-       strncpy(&tables->aml[9], "CPU0", 4);
+       strncpy((char *)&tables->aml[9], "CPU0", 4);
 
        dsdt->checksum = generate_acpi_checksum(dsdt, dsdt->length);
 
@@ -801,8 +800,8 @@ dom_fw_init (struct domain *d, char *args, int arglen, char *fw_mem, int fw_mem_
        sal_systab->sal_rev_major = 0;
        sal_systab->entry_count = 1;
 
-       strcpy(sal_systab->oem_id, "Xen/ia64");
-       strcpy(sal_systab->product_id, "Xen/ia64");
+       strcpy((char *)sal_systab->oem_id, "Xen/ia64");
+       strcpy((char *)sal_systab->product_id, "Xen/ia64");
 
        /* fill in an entry point: */
        sal_ed->type = SAL_DESC_ENTRY_POINT;
index 835133b0f0ee42c72b7153c26c7b5f6886aec6b2..db671353839e070ed689fcbe918855cd64cb33b0 100644 (file)
@@ -351,8 +351,9 @@ void new_thread(struct vcpu *v,
                regs->cr_ipsr = 0x501008826008; /* Need to be expanded as macro */
        } else {
                regs->cr_ipsr = ia64_getreg(_IA64_REG_PSR)
-                       | IA64_PSR_BITS_TO_SET | IA64_PSR_BN
-                       & ~(IA64_PSR_BITS_TO_CLEAR | IA64_PSR_RI | IA64_PSR_IS);
+                 | IA64_PSR_BITS_TO_SET | IA64_PSR_BN;
+               regs->cr_ipsr &= ~(IA64_PSR_BITS_TO_CLEAR
+                                  | IA64_PSR_RI | IA64_PSR_IS);
                regs->cr_ipsr |= 2UL << IA64_PSR_CPL0_BIT; // domain runs at PL2
        }
        regs->cr_iip = start_pc;
index 027e54f3ca54444653e4bd3054ba70177c96b3e8..a236e2dd2a6f691345647e6407548435a6ae4bcd 100644 (file)
@@ -945,8 +945,8 @@ IA64FAULT vcpu_set_eoi(VCPU *vcpu, UINT64 val)
        p = &PSCBX(vcpu,insvc[3]);
        for (i = 3; (i >= 0) && !(bits = *p); i--, p--);
        if (i < 0) {
-               printf("Trying to EOI interrupt when none are in-service.\r\n");
-               return;
+               printf("Trying to EOI interrupt when none are in-service.\n");
+               return IA64_NO_FAULT;
        }
        bitnum = ia64_fls(bits);
        vec = bitnum + (i*64);
@@ -957,7 +957,7 @@ IA64FAULT vcpu_set_eoi(VCPU *vcpu, UINT64 val)
        if (PSCB(vcpu,interrupt_delivery_enabled)) { // but only if enabled...
                // worry about this later... Linux only calls eoi
                // with interrupts disabled
-               printf("Trying to EOI interrupt with interrupts enabled\r\n");
+               printf("Trying to EOI interrupt with interrupts enabled\n");
        }
        if (vcpu_check_pending_interrupts(vcpu) != SPURIOUS_VECTOR)
                PSCB(vcpu,pending_interruption) = 1;
index 45ffcebff155fce9810931dbe2dace83459e901d..79fe23563383288eaf78b2310eed0f067127311c 100644 (file)
@@ -141,7 +141,7 @@ xen_timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
        new_itm = local_cpu_data->itm_next;
 
        if (!VMX_DOMAIN(current) && !time_after(ia64_get_itc(), new_itm))
-               return;
+               return IRQ_HANDLED;
 
        if (VMX_DOMAIN(current))
                vcpu_wake(current);
index fcf80d0f224e4633ccd22d4d1057992fb866bf1b..1c5f3d09aabc0ee841d41e77f19b1ffb31c57099 100644 (file)
@@ -119,7 +119,7 @@ extern unsigned long dom_fw_setup(struct domain *, char *, int);
 #define FW_HYPERCALL_EFI_GET_NEXT_HIGH_MONO_COUNT_PADDR        FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_GET_NEXT_HIGH_MONO_COUNT_INDEX)
 #define FW_HYPERCALL_EFI_RESET_SYSTEM_PADDR            FW_HYPERCALL_PADDR(FW_HYPERCALL_EFI_RESET_SYSTEM_INDEX)
 
-extern struct ia64_pal_retval xen_pal_emulator(UINT64,UINT64,UINT64,UINT64);
+extern struct ia64_pal_retval xen_pal_emulator(UINT64, u64, u64, u64);
 extern struct sal_ret_values sal_emulator (long index, unsigned long in1, unsigned long in2, unsigned long in3, unsigned long in4, unsigned long in5, unsigned long in6, unsigned long in7);
 extern struct ia64_pal_retval pal_emulator_static (unsigned long);
 
index 2f5ecead3142fc60a32ed231f5e8c202a0ef94c8..d0c3286448e2a6614ab5ec448d75c1c1009b8113 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __FLUSHTLB_H__
 #define __FLUSHTLB_H__
 
+#include <asm/tlbflush.h>
+
 /* The current time as shown by the virtual TLB clock. */
 extern u32 tlbflush_clock;
 
index 1f53552e48c962a53c747d2f6debf4e98eb14959..ae5a8ae3983ff68755bf72d3cfd517bc58419fa9 100644 (file)
@@ -290,6 +290,9 @@ void cpu_idle_wait(void);
 
 #ifdef XEN
 #include <asm/xensystem.h>
+#ifndef __ASSEMBLY__
+struct resource;
+#endif
 #endif
 
 #endif /* _ASM_IA64_SYSTEM_H */
index 03c1737cbc2e61bba54445639c7fb189972132cd..a87856149eddb1f4c50a463e4d2df7cd7da63471 100644 (file)
@@ -462,4 +462,6 @@ extern unsigned long lookup_domain_mpa(struct domain *d, unsigned long mpaddr);
 /* Arch-specific portion of memory_op hypercall. */
 #define arch_memory_op(op, arg) (-ENOSYS)
 
+extern void assign_domain_page(struct domain *d, unsigned long mpaddr,
+                              unsigned long physaddr);
 #endif /* __ASM_IA64_MM_H__ */